<?php

class Pictet2_Iterators_Filters_Default extends FilterIterator {
	
	private $_thumbnailer;
	
	public function __construct(DirectoryIterator $dirIterator, $thumbnailer) {
		parent::__construct($dirIterator);
		$this->_thumbnailer = $thumbnailer;
	}
	
	public function accept() {
		return $this->_thumbnailer->isValid($this->current());
	}
}